using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// FORM PAGE FOR NEW DENTIST REGISTRATION AND EDITTING THEIR PROFILE.
/// </summary>
/// <remarks>
/// AUTHOR  : KAJAL MANDAL
/// DATE    : 8 JUNE 2007
/// </remarks>
public partial class Dentist_DentistRegistration : System.Web.UI.Page
{
    private int DentistID;

    protected void Page_Load(object sender, EventArgs e)
    {
        DentistID = 0;
        //Master.TopLoginIMG = false;
        if (Request.QueryString["dtl"] != null)
        {
            if (Request.QueryString["dtl"].ToUpper() == Session.SessionID.ToUpper())
            {
                mvwDentistReg.SetActiveView(vwConfirmation);
            }
        }
        else
        {
            CtrlDentistReg1.strRedirect = Session["strHttps"].ToString() + "dentist/dentistRegistration.aspx?dtl=" + Session.SessionID;
            mvwDentistReg.SetActiveView(vwForm);

            if (!IsPostBack)
            {
                if (Session["key"] != null)
                {
                    if ((Session["key"].ToString() == Session.SessionID) && (Request.QueryString["id"] != null))
                    {
                        try
                        {                            
                            DentistID = Convert.ToInt32(Request.QueryString["id"].ToString());
                            CtrlDentistReg1.FillControls(DentistID);                            
                        }
                        catch
                        {
                            Response.Redirect(Session["strHttp"].ToString() + "default.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect(Session["strHttp"].ToString() + "default.aspx");
                    }
                }
            }
        }
        return;
    }
    protected void CtrlDentistReg1_Load(object sender, EventArgs e)
    {

    }
}
